home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0195.ZIP / WINDOWS.PAS < prev   
Pascal/Delphi Source File  |  1984-12-04  |  2KB  |  56 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5. }
  6. {$I windows.lib}
  7. const
  8.   Win1    : corners = (5,5,40,20);
  9.   Win2    : corners = (45,3,75,18);
  10.   MainWin : corners = (1,1,80,25);
  11.  
  12. var
  13.   Win3 : corners;
  14.   N    : byte;
  15. begin
  16.   DoFrame(Win1,'═','║');
  17.   DoFrame(Win2,'~','!');
  18.   DoWindow(Win1);
  19.   Write('Writing in window number one, framed in double lines.');
  20.   Write('Press a key.');
  21.   repeat until keypressed;
  22.   DoWindow(Win2);
  23.   Write('Now writing in window number two, framed in tildes and ');
  24.   Write('exclamation points.');
  25.   Write('Press a key.');
  26.   repeat until keypressed;
  27.   DoWindow(Win1);
  28.   ClrScr;
  29.   Write('Enter coordinates for yet another window.  ');
  30.   DoWindow(Win2);
  31.   ClrScr;
  32.   WriteLn('If they are OK, that window will appear.');
  33.   Write('Upper Left X: ');
  34.   read(Win3[1]);
  35.   WRiteLn;
  36.   Write('Upper Left Y: ');
  37.   read(Win3[2]);
  38.   WRiteLn;  Write('Lower Right X: ');
  39.   read(Win3[3]);
  40.   WRiteLn;  Write('Lower Right Y: ');
  41.   read(Win3[4]);
  42.   IF (Win3[1] > 1) and (Win3[2] > 1) and (Win3[3] < 79) and (Win3[4] < 24)
  43.     and (Win3[3] - Win3[1] > 2) and (Win3[4] - Win3[2] > 2) then
  44.        begin
  45.          DoFrame(Win3,#196,#179);
  46.          DoWindow(Win3);
  47.          ClrScr;
  48.          repeat
  49.            Write('....WINDOW!.....');
  50.          until keypressed;
  51.        end;
  52.   DoWindow(MainWin);
  53. end.
  54.  
  55.  
  56.